//
// Created by two8g on 17-11-27.
//

#include "PayrollDataBase.h"
#include "Employee.h"

PayrollDataBase GpayrollDatabase;

PayrollDataBase::~PayrollDataBase() {

}

Employee *PayrollDataBase::GetEmployee(int empId) {
    return itsEmployees[empId];
}

void PayrollDataBase::AddEmployee(int empId, Employee *e) {
    itsEmployees[empId] = e;
}

void PayrollDataBase::DeleteEmployee(int empId)
{
    itsEmployees.erase(empId);
}

void PayrollDataBase::AddUnionMember(int memberId, Employee *e)
{
    itsMembers[memberId] = e;
}

Employee* PayrollDataBase::GetUnionMember(int memberId)
{
    return itsMembers[memberId];
}
